# cython: profile=True
import cython
from v3dsolver.vector cimport Vec,Vec_new
from v3dsolver.fluid_elements.fluid_elems cimport Saffman
from v3dsolver.neighbour_finder cimport Bin
from numpy cimport ndarray
cimport lpsolver
cimport cython

cdef extern from "math.h":
    double sqrt(double x)
    double pi
    double cos(double x)
    double sin(double x)

cdef class VRTSolver:
    cdef public list base_elem
    cdef public int base_index
    cdef public list nbrs
    cdef public double cellsize
    cdef public double R
    cdef public double h_nu
    cdef public int n
    cdef public list possible_nbrs
    cdef public Bin finebin
    cdef public int len_elems
    cdef public str _hash_prefix
    
    
    @cython.locals(possible_nbr=Vec,j=int,nbr=list,l=int,
                   dist_possible_nbrs=ndarray,
                   nbr_pos=Vec,rvec=Vec,r=double,new_index=int,
                   new_hash=str,str_new_index=str)
    cdef add_neighbour(VRTSolver self, int countnew)
    
    cdef get_fractions(self,double* f,double* max_f,double* min_f,double* fsum)
    
